package com.lt.experiment05.mission01;

import java.util.ArrayList;
import java.util.List;

/**
 * @author LT
 * @version 1.0
 * @PackageName com.lt.experiment05.mission01
 * @ClassName AbstractObjectList
 * @Description to do
 * @date 2021/11/16 10:47
 */
public abstract class AbstractObjectList {
    List objects;

    public AbstractObjectList(List<Menu> objects) {
        this.objects = objects;
    }

    public void addObject(Object obj) {
        this.objects.add(obj);
    }

    public void removeObject(Object obj) {
        this.objects.remove(obj);
    }

    public List<Object> getObjects() {
        return this.objects;
    }

    public abstract Abstractlterator createIterator();
}
